package cn.edu.neusoft.yuejian12.Model;

import java.util.List;

import cn.edu.neusoft.yuejian12.JavaBean.Activity;
import cn.edu.neusoft.yuejian12.JavaBean.Club;
import cn.edu.neusoft.yuejian12.Service.ClubService;
import cn.edu.neusoft.yuejian12.Service.TrainService;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by 木子李 on 2017/10/12.
 */

public class ClubModel {
    private Retrofit retrofit;
    public ClubModel(){
        retrofit = new Retrofit.Builder()
                .addConverterFactory(GsonConverterFactory.create())
                .baseUrl("http://172.24.10.175/workout/api.php/")
                .build();
    }
    public Call<List<Club>> getAllclub()
    {
        ClubService clubService=retrofit.create(ClubService.class);
        return  clubService.getAllclub();
    }
    public Call<Club> getclubinfo(String id){
        ClubService clubService = retrofit.create(ClubService.class);
        return clubService.getClubinfo("lgj98rfkiqvenhrk2o7oe2po81","1","Clubteacher","club",id);
    }
}
